package com.example.demo.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class Role {
    private Integer id;
    private String name;
    private String description;
    @JsonProperty("modules")
    private String module;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime create_time;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime update_time;

    public Role(String name, String description, String module) {
        this.name = name;
        this.description = description;
        this.module = module;
    }

    public Role(Integer id, String name, String description, String module) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.module = module;
    }

    public Role() {
    }

    public Role(Integer id, String name, String description, String module, LocalDateTime create_time, LocalDateTime update_time) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.module = module;
        this.create_time = create_time;
        this.update_time = update_time;
    }
}
